package com.example.tests;

import com.example.framework.HelperManager;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;

import java.io.File;
import java.io.FileReader;
import java.util.Properties;

public class TestManager {

    protected static HelperManager manager;

    @BeforeTest
    protected void setUp() throws Exception {
        String configFile = System.getProperty("configFile", "application.properties");
        Properties properties = new Properties();
        properties.load(new FileReader(new File(configFile)));
        manager = new HelperManager(properties);
    }

    @AfterTest
    protected void tearDown() throws Exception {
        manager.stop();
    }

}
